package com.dream.bean;

import java.util.HashMap;
import java.util.Map;

public class Msg {
	private boolean success;
	private String msg;
	private Map<String, Object> data=new HashMap<String, Object>();
	
	public static Msg Success() {
		Msg msg=new Msg();
		msg.setSuccess(true);
		msg.setMsg("请求成功");
		return msg;
	}
	
	public static Msg Fail() {
		Msg msg=new Msg();
		msg.setSuccess(false);
		msg.setMsg("请求失败");
		return msg;
	}
	
	public Msg putData(String key,Object value) {
		this.getData().put(key, value);
		return this;
	}

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Map<String, Object> getData() {
		return data;
	}

	public void setData(Map<String, Object> data) {
		this.data = data;
	}

}
